<div class="layui-form" lay-filter="layuiadmin-form-convert-upload-ofdinvoice">
    <input type="hidden" name="id" id="hid-convert-upload-ofdinvoice" value="" />
    <script type="text/html" template>
        <input type="hidden" name="invoiceType" value="{{ d.params.invoiceType || '' }}" />
    </script>
    <div class="layui-form-item">
        <div class="layui-upload">
            <div>
                <!--<button type="button" class="layui-btn layui-btn-normal" id="ID-upload-electronic-files">
                    <i class="layui-icon layui-icon-upload"></i>
                    选择文件
                </button>-->
                <input type="file" name="file" multiple id="ID-upload-electronic-files" accept=".ofd">
            </div>
            <div style="margin-top:10px;">
                <p><span style="color:red;">提示：</span></p>
                <p><span style="color:red;">1，仅支持OFD格式原件，由其它格式转换成的OFD文件或含乱码文件，系统不做解析。</span></p>
                <script type="text/html" template>
                    <p><span style="color:red;">2，每个文件不超过{{ d.params.singleFileMaxLength || '' }}MB，最多不超过{{ d.params.atOnceUploadFileMaxNumber || '' }}个文件同时上传。</span></p>
                </script>
            </div>
            <div class="layui-upload-list">
                <table class="layui-table">
                    <colgroup>
                        <col style="min-width: 100px;">
                        <col width="150">
                        <col width="260">
                        <col width="150">
                    </colgroup>
                    <thead>
                    <th>文件名</th>
                    <th>大小</th>
                    <th>上传进度</th>
                    <th>操作</th>
                    </thead>
                    <tbody id="ID-upload-ofdinvoice-files-list"></tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="layui-form-item" style="text-align:right;float:right;">
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-tips" lay-tips="默认会转换PDF，请选择是否同时转换以下格式"></i> 设置：
        </label>
        <div class="layui-input-block">
            <input type="checkbox" name="arr[convertXml]" title="转换XML" />
        </div>
    </div>
    <div class="layui-form-item" style="text-align:right;">
        <input type="button" class="layui-btn" id="ID-upload-ofdinvoice-files-action" value="开始上传" />
        <input type="button" class="layui-btn" lay-submit lay-filter="LAY-upload-ofdinvoice-front-submit" id="ID-upload-ofdinvoice-form-submit" value="提交转换" />
    </div>
</div>
<script>
    layui.use(['admin', 'form', 'upload'], function () {
        var $ = layui.$
            , form = layui.form
            , upload = layui.upload;

        //上传头像
        upload.render({
            elem: '#layuiadmin-upload-useradmin'
            , url: './res/json/upload/demo.js'
            , accept: 'images'
            , method: 'get'
            , acceptMime: 'image/*'
            , done: function (res) {
                $(this.item).prev("div").children("input").val(res.data.src)
            }
        });
    })
</script>